local system = CEGUI.System:getSingleton()
local wmgr = CEGUI.WindowManager:getSingleton()
local cursor = CEGUI.MouseCursor:getSingleton()
local imgman = CEGUI.ImagesetManager:getSingleton()

imgman:create("TitleScreen.imageset");

local root = wmgr:loadWindowLayout("titleScreen.layout")

system:setGUISheet(root)
cursor:hide()

function statusBoxUpdated(e)
	local statusbox = CEGUI.WindowManager:getSingleton():getWindow("Root/StatusBox")
	local str = statusbox:getText().."\n"	
	local status = tolua.cast(Overseer:getSingleton():getCurrentState(),"TitleScreenState"):getStatus()
	if status~="" then statusbox:setText(str .. status) end
end